package com.xiaoshuidi.cloud.module.contract.api;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.contract.enums.ApiConstants;
import com.xiaoshuidi.cloud.module.contract.vo.OwnerOrderTransferCallbackReqVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.SERVERNAME)
@Tag(name = "RPC 服务 - 业主合同")
public interface ContractOwnerOrderApi {

    /**
     * 判断业主合同退租
     * @param orderId
     * @return: com.xiaoshuidi.cloud.framework.common.pojo.CommonResult<java.lang.Boolean>
     */
    @GetMapping(ApiConstants.PREFIX + "/owner/check-rent_out")
    CommonResult<Boolean> ownerContractCheckRentOut(@RequestParam("orderId") Long orderId);

    @PostMapping(ApiConstants.PREFIX + "/owner/transfer/callback")
    CommonResult<Void> ownerTransferCallback(@RequestBody OwnerOrderTransferCallbackReqVO reqVO);
}
